-
Notifications
You must be signed in to change notification settings - Fork 172
Editorial: Add note about hard-coded overflow constrain #3162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3162 +/- ##
=======================================
Coverage 96.91% 96.91%
=======================================
Files 22 22
Lines 10209 10209
Branches 1839 1839
=======================================
Hits 9894 9894
Misses 266 266
Partials 49 49 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One one minor (and optional) question.
1. If _sign_ × (_d1_ - _isoDate2_.[[Day]]) > 0, return *true*. | ||
1. Return *false*. | ||
</emu-alg> | ||
<emu-note>This operation intentionally uses overflow ~constrain~ when regulating the year-month.</emu-note> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth explaining why we use ~constrain~
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I can clearly explain why. It's just a choice we made for how the algorithm works. There are other choices that could have been made.
Do you want to try?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that @ptomato may have more recent knowledge than I do about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me either with or without the additional comment. I'd normally love to contribute the additional comment but I'm unfortunately short on time right now.
This is intentional, but it looks like a bug when implementing, so it's worth calling out.